package com.fqgj.sentry.controller.mc.request;

import com.fqgj.sentry.biz.mc.domain.AddUserInfo;
import com.fqgj.sentry.common.request.ParamsObject;
import com.fqgj.sentry.manage.enums.UserLevelEnums;


import java.util.List;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-13 下午2:13
 */


public class AddUserRequest extends ParamsObject {

    private String name;
    private String account;
    private String mobile;
    private List<String> applicationId;
    private List<String> roleId;

    public String getName() {
        return name;
    }

    public AddUserRequest setName(String name) {
        this.name = name;
        return this;
    }

    public String getAccount() {
        return account;
    }

    public AddUserRequest setAccount(String account) {
        this.account = account;
        return this;
    }

    public String getMobile() {
        return mobile;
    }

    public AddUserRequest setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public List<String> getApplicationId() {
        return applicationId;
    }

    public AddUserRequest setApplicationId(List<String> applicationId) {
        this.applicationId = applicationId;
        return this;
    }

    public List<String> getRoleId() {
        return roleId;
    }

    public AddUserRequest setRoleId(List<String> roleId) {
        this.roleId = roleId;
        return this;
    }

    @Override
    public void validate() {

    }
    public static AddUserInfo transformToAddUserInfo(AddUserInfo addUserInfo , AddUserRequest addUserRequest){
        addUserInfo.setAccount(addUserRequest.getAccount())
                .setLevel(UserLevelEnums.nomarl_user.getLevel())
                .setMobile(addUserRequest.getMobile())
                .setName(addUserRequest.getName());
        return addUserInfo;
    }

}
